package com.truyen.model;

import java.util.ArrayList;
import java.util.List;

public class ChapterTmpTruyenModel {
	private float chapterNumber;
    private long id;
	
    
	/**
	 * @return the chapterNumber
	 */
	public float getChapterNumber() {
		return chapterNumber;
	}

	/**
	 * @param chapterNumber the chapterNumber to set
	 */
	public void setChapterNumber(float chapterNumber) {
		this.chapterNumber = chapterNumber;
	}

	/**
	 * @return the id
	 */
	public long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(long id) {
		this.id = id;
	}

	public static ChapterTmpTruyenModel addChapterTruyenModel(Object obj) {
		Object[] arr = (Object[]) obj;
		float chapterNum = (Float) arr[1];
		long idChapter = (Long) arr[0];
		ChapterTmpTruyenModel chm = new ChapterTmpTruyenModel();
		chm.setChapterNumber(chapterNum);
		chm.setId(idChapter);
		return chm;
	}

	public static List<ChapterTmpTruyenModel> addLstaddChapterTruyenModel(List<Object> lstOjb) {
		ArrayList<ChapterTmpTruyenModel> arr = new ArrayList<ChapterTmpTruyenModel>();
		for (Object lst : lstOjb) {
			arr.add(addChapterTruyenModel(lst));
		}
		return arr;
	}

}
